From: Sebastian Keller Date: Wed, 22 Jan 2020 18:12:49 +0000 (+0100) Subject: st/icon: Fix GIcon leak in set_icon_name X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~781^2^2~147 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6eacbeb203211471fa3381cfe5161abaa1d24153;p=gnome-shell.git st/icon: Fix GIcon leak in set_icon_name set_icon_name() leaks a GIcon by using the set_icon method which adds a ref to the GIcon without removing its own ref after calling the method. Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/2146 --- diff --git a/src/st/st-icon.c b/src/st/st-icon.c index aa98ed223..70e4fb46c 100644 --- a/src/st/st-icon.c +++ b/src/st/st-icon.c @@ -549,7 +549,7 @@ void st_icon_set_icon_name (StIcon *icon, const gchar *icon_name) { - GIcon *gicon = NULL; + g_autoptr(GIcon) gicon = NULL; g_return_if_fail (ST_IS_ICON (icon));